#define _CRT_SECURE_NO_WARNINGS 1

class Solution {
public:
    int buyChoco(vector<int>& prices, int money) {
        sort(prices.begin(), prices.end());
        return money - prices[0] - prices[1] >= 0 ? money - prices[0] - prices[1] : money;
    }
};